<?php
namespace app\controller;

use app\BaseController;
use app\model\Config;
use app\model\Message;
use think\facade\Db;
use think\Request;

/* 配置 */
class ConfigController extends BaseController
{
    public function delEvery15Day()
    {
        $elevator_rdata = Db::table('elevator_rdata')->whereTime('create_time', '<', '-15 day')->delete();
        $re['elevator_rdata'] = $elevator_rdata;
        return success($re);
    }
    public function delEvery15Day2()
    {
        $elevator_alarm_rdata = Db::table('elevator_alarm_rdata')->whereTime('create_time', '<', '-15 day')->delete();
        $re['elevator_alarm_rdata'] = $elevator_alarm_rdata;
        return success($re);
    }
    public function delEvery15Day3()
    {
        $elevator_work_data = Db::table('elevator_work_data')->whereTime('create_time', '<', '-15 day')->delete();
        $re['elevator_work_data'] = $elevator_work_data;
        return success($re);
    }
    public function delEvery15Day4()
    {
        $tower_crane_rdata = Db::table('tower_crane_rdata')->whereTime('create_time', '<', '-15 day')->delete();
        $re['tower_crane_rdata'] = $tower_crane_rdata;
        return success($re);
    }
    public function delEvery15Day5()
    {
        $tower_crane_work_data = Db::table('tower_crane_work_data')->whereTime('create_time', '<', '-15 day')->delete();
        $re['tower_crane_work_data'] = $tower_crane_work_data;
        return success($re);
    }
    public function delEvery15Day6()
    {
        $tower_alarm_rdata = Db::table('tower_alarm_rdata')->whereTime('create_time', '<', '-15 day')->delete();
        $re['tower_alarm_rdata'] = $tower_alarm_rdata;
        return success($re);
    }
}
